// @ts-nocheck
'use client';
import { NextPage } from 'next';
import dynamic from 'next/dynamic';
import { unstableSetRender } from 'antd';
import { createRoot } from 'react-dom/client';

unstableSetRender((node, container) => {
    container._reactRoot ||= createRoot(container);
    const root = container._reactRoot;
    root.render(node);
    return async () => {
        await new Promise((resolve) => setTimeout(resolve, 0));
        root.unmount();
    };
});


// @ts-ignore
const AdminApp = dynamic(() => import('@/app/components/admin/AdminApp'), {
    ssr: false,
});

const Admin: NextPage = () => <AdminApp />;

export default Admin;